package com.lmx.common.constants;

/**
 * 网站初始化常量类型
 *
 * @author ytche
 * @date 2017年7月19日
 *
 */
public enum InitContantType {
	PC(0, "pc端"), MOBILE(1, "手机端"), OFFICIAL_ACCOUNTS(2, "公众号");
	private String name;
	private Integer value;

	private InitContantType(Integer value, String name) {
		this.name = name;
		this.value = value;
	}

	public static InitContantType getByValue(Integer value) {
		for (InitContantType type : InitContantType.values()) {
			if (value.equals(type.getValue())) {
				return type;
			}
		}
		return null;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Integer getValue() {
		return value;
	}

	public void setValue(Integer value) {
		this.value = value;
	}

}
